package my.edu.model.information.entity.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import jakarta.validation.groups.Default;
import lombok.Data;
import my.edu.common.validate.groups.Insert;
import my.edu.common.validate.IntegerPattern;

@Data
public class CustomerCategoryDTO {
    @Null(message = "id必须为空",groups = Insert.class)
    @NotNull(message = "id不能为空" ,groups = { Default.class})
    private Long id;
    @NotBlank(message = "类别名称不能为空", groups = {Insert.class, Default.class})
    private String categoryName;
    private Long parentId;
    @IntegerPattern(regexp = "^[01]$", message = "状态参数错误", groups = {Insert.class, Default.class})
    private Integer status;

}
